<?php

class TagController extends Controller
{
	public function actionIndex()
	{
		$dataProvider = new CActiveDataProvider('TagTotal', array(
			'pagination'=>array(
				'pageSize'=>100,
			),
		));
		$this->render('index', array(
			'dataProvider'=>$dataProvider,
		));
	}
	
	public function actionView($tag)
	{
		$dataProvider = new CActiveDataProvider('Tag', array(
			'criteria'=>array(
				'condition'=>'tag = :Tag',
				'params'=>array(':Tag'=>$tag),
				'with'=>'node',
			),
		));
		$this->render('view', array(
			'dataProvider'=>$dataProvider,
		));
	}
}